<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
</head>

<body>
    <div data-ng-app="myApp" data-ng-controller="myController" data-ng-init="firstName='John'">
        <p>名字 :
            <input type="text" data-ng-model="name"> </p>
        <h1>Hello {{name}}</h1>
        <p>初始化名字为：<span data-ng-bind="firstName"></span></p>
        <p>数字＋数字：<span>{{ 5 + 5 }}</span></p>
        <p>
            姓：<input type="text" data-ng-model="last" /><br /> 名：
            <input type="text" data-ng-model="first" /><br /> 姓名：{{ first + " " + last }}
        </p>
    </div>
    <script src="../node_modules/angular/angular.min.js"></script>
    <script type="application/javascript">
        var app = angular.module("myApp", []);
        app.controller('myController', function($scope) {
            $scope.first = "John";
            $scope.last = "Doe";
        });

    </script>
</body>

</html>
